package com.eu.ebpm.engine.exception;

/**
 * 工作流顶层异常
 * @author 王晓华
 * @since 2013-12-13 下午07:25:54
 * @version v1.0
 */
public class WorkFlowException extends RuntimeException {

	private static final long serialVersionUID = 1L;
	
	protected String errorCode;

	public WorkFlowException() {
	}
	
	public WorkFlowException(ErrorCode errorCode, String extraMsg) {
		super(errorCode.getDesc() + extraMsg);
		this.errorCode = errorCode.getCode();
	}
	
	public WorkFlowException(ErrorCode errorCode) {
		super(errorCode.getDesc());
		this.errorCode = errorCode.getCode();
	}

	public WorkFlowException(String message) {
		super(message);
	}
	
	public WorkFlowException(String errorCode, String message) {
		super(message);
		this.errorCode = errorCode;
	}

	public WorkFlowException(Throwable cause) {
		super(cause);
	}

	public WorkFlowException(String message, Throwable cause) {
		super(message, cause);
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}
	
}
